Can I have two virtual hosts with same servername?
am 09.04.2010 11:44:46 von Michael Ni--001636ed6dfa500dae0483caa5ac
Content-Type: text/plain; charset=ISO-8859-1
I have a java project that resides in tomcat. Recently we needed to add
Wordpress (php project).
We decided to go with Apache Server in front with virtual hosts with
mod_proxy_ajp.
So far I have gotten different server names to work
http://www.foobar.com
http://blog.foobar.com
ServerName www.foobar.com
AddDefaultCharset Off
Order deny,allow
Allow from all
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ServerName blog.foobar.com
ErrorLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/
error.log"
DocumentRoot "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs"
HOWEVER,
we want to do the following instead
http://www.foobar.com
http://www.foobar.com/blog
why does the following NOT work?
ServerName www.foobar.com
AddDefaultCharset Off
Order deny,allow
Allow from all
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ServerName www.foobar.com
ServerPath /blog
ErrorLog "C:/Program Files/Apache Software
Foundation/Apache2.2/logs/error.log"
DocumentRoot "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs"
--001636ed6dfa500dae0483caa5ac
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I have a java project that resides in tomcat.=A0 Recently we needed to add
Wordpress (php project).=A0
We decided to go with Apache Server=20
in front with virtual hosts with mod_proxy_ajp.
So far I have=20
gotten different server names to work
http://www.foobar.=
com
http://blo=
g.foobar.com
<VirtualHost
*:80>
ServerName
"_blank">www.foobar.com
=A0 =A0
<Proxy *>
AddDefaultCharset O=
ff
Order=20
deny,allow
Allow from all
</Proxy>
=A0
r> =20
ProxyPass / ajp://localhost:8009/
ProxyPassReverse /=20
ajp://localhost:8009/
</VirtualHost>
<VirtualHost *:80>
=A0 ServerNam=
e =
ErrorLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/=
DocumentRoot "C:/Program Files/Apache Software=20
Foundation/Apache2.2/htdocs"
</VirtualHost>
HO=
WEVER,
we want to do the following instead
m/" target=3D"_blank">http://www.foobar.com
http://www.foobar.=
com/blog
why
does the following NOT work?
<VirtualHost *:80>
ServerName www.=
foobar.com
=A0 =A0
<Proxy *>
AddDefaultCharset Off
Order deny,allow
Allow from all
</Proxy>
=A0
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>
<VirtualHost *:80>
=A0 ServerName w=
ww.foobar.com
=A0
ServerPath /blog
ErrorLog "C:/Program Files/Apache Software=20
Foundation/Apache2.2/logs/error.log"
DocumentRoot "C:/Program Files/Apache Software=20
Foundation/Apache2.2/htdocs"
</VirtualHost>
--001636ed6dfa500dae0483caa5ac--